home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TInternetAssistantDialog.cp
-
- Contains: Subclass of CDialogs which offer multiple pages
-
- Written by: Arno Gourdol
-
- Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
-
- */
-
- #pragma once
-
- #ifndef __TINTERNETASSISTANTDIALOG__
- #define __TINTERNETASSISTANTDIALOG__
-
- #include "TAssistant.h"
- #include "CInternetConfig.h"
- #include "ICAPI.h"
-
- #include "TMapView.h"
-
- enum
- {
- // ID of the STR resource in the system file containing the
- // name of the user
- kUserNameSTR = -16096
- };
-
-
-
- class TInternetAssistantDialog : public TAssistant
- {
- public:
- enum
- {
- kIntroPane = 201,
- kPersonalInfoPane = 202,
- kLocationPane = 203,
- kEmailOnePane = 204,
- kEmailTwoPane = 205,
- kSignaturePane = 206,
- kHomePagePane = 207,
- kNNTPHostPane = 208,
- kEmailError = 211
- };
- enum
- {
- kUserNameField = kLastCommonItem + 1,
- kOrganizationField = kLastCommonItem + 2,
- kMapUserItem = kLastCommonItem + 1,
- kEmailField = kLastCommonItem + 1,
- kPasswordField = kLastCommonItem + 2,
- kEmailAccountField = kLastCommonItem + 1,
- kSMTPHostField = kLastCommonItem + 2,
- kSignatureField = kLastCommonItem + 1,
- kHomePageField = kLastCommonItem + 1,
- kNNTPHostField = kLastCommonItem + 1
- };
-
- // constructor
- TInternetAssistantDialog(TApplication* application = NULL);
-
- // destructor
- virtual ~TInternetAssistantDialog();
-
- // events
- virtual void DrawUserItem(TDrawContext& graphics, short item, const CRect& frame);
- virtual void ItemHit(UInt16 subDialog, short item);
- virtual void Pulse(void);
- virtual Boolean FilterEvent(const EventRecord& event);
- virtual Boolean FilterKey(const EventRecord& event, UInt16 key);
-
- // dialog managment
- virtual void SetDialogPane(SInt16 pane);
-
- void GetDefaultValues(void);
- virtual void GoAhead(void);
- virtual Boolean SkipPane(SInt16 pane);
- virtual SInt16 NextPane(SInt16 currentPane);
-
- private:
- CInternetConfig fInternetConfig;
- TMapView fMap;
- Str255 fPassword;
- Boolean fPasswordChanged;
- };
-
- #endif
-